/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package logica.util;

import com.csvreader.CsvWriter;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.logging.Level;
import java.util.logging.Logger;
import modelo.DTO.DTODataMining;
import modelo.DTO.DTOListaDataMining;

/**
 *
 * @author Ion B. Padilla
 * v1.1
 */
public class CSVHandler {
    /**
     * Escribe la lista de Registros DataMining en formato csv
     * @param lista lista de registros
     */

    public void escrituraListaAtributos(DTOListaDataMining lista) {
  //      String csv=new String();
        Iterator iLista = lista.getIterator();
        while (iLista.hasNext()) {
            ArrayList<DTODataMining> listaTmp = (ArrayList<DTODataMining>) iLista.next();
            Iterator iTmp = listaTmp.iterator();
            while (iTmp.hasNext()) {
                DTODataMining alumno = (DTODataMining) iTmp.next();
                 System.out.println(alumno.getCliks());
            //    System.out.print(alumno.getCliks()+";");
      //          csv=alumno.getCliks()+";";
            }
            System.out.println("");
        }    
    }
    public void escrituraListaNombres(DTOListaDataMining lista) {
  //      String csv=new String();
        Iterator iLista = lista.getIterator();
        while (iLista.hasNext()) {
            ArrayList<DTODataMining> listaTmp = (ArrayList<DTODataMining>) iLista.next();
            Iterator iTmp = listaTmp.iterator();
            while (iTmp.hasNext()) {
                DTODataMining alumno = (DTODataMining) iTmp.next();
                 System.out.println(alumno.getNombre());
            //    System.out.print(alumno.getCliks()+";");
      //          csv=alumno.getCliks()+";";
            }
            System.out.println("");
        }
    }

}
